import Vue from 'vue';
import VueRouter from 'vue-router';

Vue.use(VueRouter);

const routes = [{
        path: '/register',
        component: () =>
            import ('../views/Register.vue'),
    },
    {
        path: '/',
        component: () =>
            import ('../views/Index.vue'),
    },
    {
        path: '/linggan',
        component: () =>
            import ('../views/LingGan.vue'),
    },
    {
        path: '/yongpin',
        component: () =>
            import ('../views/YongPin.vue'),
    },
    {
        path: '/me',
        component: () =>
            import ('../views/Me.vue'),
    },
    {
        path: '/login',
        name: 'login',
        component: () =>
            import ('../views/Login.vue')
    },
    {
        path: '/register',
        name: 'register',
        component: () =>
            import ('../views/Register.vue')
    },
    {
        path: '/carts',
        component: () =>
            import ('../views/Carts.vue'),
    },
    {
        path: '/dingdan',
        component: () =>
            import ('../views/DingDan.vue'),
    }
];

const router = new VueRouter({
    mode: 'history',
    base: process.env.BASE_URL,
    routes,
});

export default router;